import React, { Component } from 'react';
import {connect} from 'react-redux';
import * as actions from './actions';
class App extends Component {
    constructor(props) {
        super(props);
        this.state = {  };
    }
    render() {
        const {num,asyncadd}=this.props;
        return (
            <>
            <button onClick={asyncadd}>
                {num}
            </button>
            </>
        );
    }
}
//有bind开头的那个东西用函数传参
// export default connect(state=>state,()=>({actions}))(App);
//一般是对象即可
export default connect(state=>state,actions)(App);